package me.lc.hammerheads.sprite;

import me.lc.hammerheads.core.GameSystem;

import com.wiyun.engine.nodes.Label;
import com.wiyun.engine.nodes.Node;
import com.wiyun.engine.nodes.Sprite;
import com.wiyun.engine.types.WYColor3B;

/**
 * 矮人的血量
 * 
 * @author Administrator
 * 
 */
public class BloodInDwarf extends Node {
	Sprite blood;
	Label bloodCount;

	public BloodInDwarf(int count) {
		blood = Sprite.make(GameSystem.tex_heart_man);
		addChild(blood);
		bloodCount = Label.make(count + "", 13);
		bloodCount.setColor(WYColor3B.make(0, 0, 0));
		bloodCount.setPosition(GameSystem.tex_heart_man.getWidth() / 2.0f, 0);
		addChild(bloodCount);
	}

	public void update(int count) {
		bloodCount.setText(count + "");
	}
}
